import React from 'react';
import {  SafeAreaView, Text, View } from 'react-native';
/*
插值表达式
*/
let str1:string = 'hello';
const name:string ='RN'
const age:number = 1;
const sex:boolean = true;
const height:number = 1.8;
const str:string = `${name} ${age} ${sex} ${height}`;
const arr1:string[] = ['🐒','1','true'];
//接口
interface IUser{
  name:string;
  age:number;
  sex:boolean;
  height:number;
}
const user:IUser = {name:'RN',age:1,sex:true,height:1.8};
const obj1:{name:string} = {name:'RN'};
const obj ={name:'RN'};
const arr=['🐒',1,'true'];
function App() {
  return (
    <SafeAreaView>
    <Text>RN</Text>
    <Text>{`RN`}</Text>
    <Text>{`RN${1+1}`}</Text>
    <Text>{obj.name}</Text>
    <Text>{arr[0]}</Text>
    <Text>{arr}</Text>
    {arr.map((item,index)=><View key={index} style={{backgroundColor:'yellow',width:100,height:100}}><Text>--{item+'==='}</Text></View>)}
    </SafeAreaView>
  );
}

export default App;
